<?php
/**
 * Routes configuration
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.app.config
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/views/pages/home.ctp)...
 */
	Router::connect('/', array('controller' => 'pages', 'action' =>'home'));
	
	Router::connect('/logout', array('controller' => 'users', 'action' =>'logout'));
	
	Router::connect('/admin', array('controller' => 'setups', 'action' => 'login', 'admin'=>true));
	
	Router::connect('/sellers', array('controller' => 'sellers', 'action' => 'login'));
	
	Router::connect('/users', array('controller' => 'users', 'action' => 'login'));
	
	Router::connect('/Users', array('controller' => 'users', 'action' => 'login'));
	
	Router::connect('/products', array('controller' => 'products', 'action' => 'index'));
	
	Router::connect('/products/product', array('controller' => 'products', 'action' => 'product'));
	
	Router::connect('/products/checkout', array('controller' => 'products', 'action' => 'checkout'));
	
	Router::connect('/products/MyWishlist', array('controller' => 'products', 'action' => 'MyWishlist'));
	
	Router::connect('/products/advancesearch', array('controller' => 'products', 'action' => 'advancesearch'));
	
	Router::connect('/products/advancesearchresults', array('controller' => 'products', 'action' => 'advancesearchresults'));
	
	Router::connect('/products/add_to_wishlist', array('controller' => 'products', 'action' => 'add_to_wishlist'));
	
	Router::connect('/products/search', array('controller' => 'products', 'action' => 'search'));
	
	Router::connect('/products/cart', array('controller' => 'products', 'action' => 'cart'), array( 'pass' =>array('view')));
	
	Router::connect('/products/product_review', array('controller' => 'products', 'action' => 'product_review'));
	
	Router::connect('/products/product_review_helpfull', array('controller' => 'products', 'action' => 'product_review_helpfull'));
	
	Router::connect('/products/:slug', array('controller' => 'products', 'action' => 'index'), array( 'pass' =>array('slug')));
	
	//Router::connect('/categories/:title/:slug', array('controller' => 'Products','action'=>'products'),array('pass' => array('slug'))); 
	
	Router::connect('/login', array('controller' => 'users', 'action' => 'login'));
	
	App::import('Lib', 'routes/SlugRoute');
	Router::connect('/:slug', array('controller' => 'pages', 'action' => 'display'), array('routeClass' => 'SlugRoute'));
